package calc.menu;

import calc.core.FolhaCalculo;
import calc.core.GestorFolhaCalculo;
import calc.filemanager.*;
import pt.utl.ist.po.ui.Command;
import pt.utl.ist.po.ui.InvalidOperation;
import pt.utl.ist.po.ui.Menu;
import calc.textui.main.MenuEntry;

public class MenuPrincipal extends Menu {

	public MenuPrincipal(GestorFolhaCalculo gestorFolhaCalculo) {
		super( MenuEntry.TITLE, new Command<?>[] {
				
				/*
				new calc.filemanager.Criar(gestorFolhaCalculo),
				new calc.filemanager.Abrir(gestorFolhaCalculo),
				new calc.filemanager.Guardar(gestorFolhaCalculo),
				new calc.filemanager.GuardarComo(gestorFolhaCalculo, ""),
				*/

				new calc.menu.command.principal.Criar(gestorFolhaCalculo),
				 
				new Command<GestorFolhaCalculo> (MenuEntry.OPEN, gestorFolhaCalculo) {
						public final void execute() {
						   
						}
						
				 },
				 
				 new Command<GestorFolhaCalculo> (MenuEntry.SAVE, gestorFolhaCalculo) {
						public final void execute() {
						   
						}
						
				 },
				 
				 new Command<GestorFolhaCalculo> (MenuEntry.SAVE_AS, gestorFolhaCalculo) {
						public final void execute() {
						   
						}
						
				 },
				
				 new Command<GestorFolhaCalculo> (MenuEntry.MENU_CALC, gestorFolhaCalculo) {
						public final void execute() {
							Menu m = new calc.menu.MenuEdicao(entity());
							m.open();
						}
						
				 },
				 
				 new Command<GestorFolhaCalculo> (MenuEntry.MENU_SEARCH, gestorFolhaCalculo) {
						public final void execute() {
							Menu m = new calc.menu.MenuConsultas(entity());
							m.open();
						}
						
				 },
				 
					 
					 
				
				
				
		});

	}
}
